//
//  AndOperator.m
//  LogicCalculator
//
//  Created by Francisco Gindre on 4/25/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "AndOperator.h"


@implementation AndOperator 
static AndOperator* andInstance=nil;

+(Boolean)execute:(Boolean)value1 :(Boolean)value2{
	return value1&&value2;
}


+ (AndOperator*) getInstance{
	if (andInstance==nil) {
		andInstance = [[super allocWithZone:NULL]initWithName:@"^"];
	}
	return andInstance;
}



+ (id)allocWithZone:(NSZone *)zone{
	return [[self getInstance]retain];
}

- (id)copyWithZone:(NSZone*)zone
{
	return self;
}

-(id)retain
{
	return self;
}

- (NSUInteger)retainCount
{
	return NSUIntegerMax;
}

- (void) release 
{
	
}

-(id) autorelease 
{
	return self;
}

@end
